package com.dubito.pattern.创建型模式.生成器模式OR建造者模式.计算机生产;

/**
 * @author liliang
 * @date 2020/8/26.
 */
public class X201Builder implements ComputerBuilder {

    private X201 computer = new X201();

    @Override
    public void buildCup() {
        computer.setCpu("i3-550");
    }

    @Override
    public void buildRam() {
        computer.setRam("8G");
    }

    @Override
    public void buildHardDisk() {
        computer.setHardDisk("1T 7200转");
    }

    @Override
    public void buildGraphicCard() {

    }

    @Override
    public void buildMonitor() {
        computer.setMonitor("49英寸");
    }

    @Override
    public void buildOs() {
        computer.setOs("Mac");
    }

    @Override
    public Computer getResult() {
        return computer;
    }
}
